import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import plotly.express as px
import plotly.graph_objects as go
from plotly.offline import init_notebook_mode, iplot
import os
from PIL import Image
from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator
df_aka_orj=pd.read_csv('akademisyenler.csv',encoding='ISO-8859-9')
df_aka_orj=df_aka_orj.sort_values(by=['Yayınlar ve Makaleler'],ascending=False)
df_aka_orj.head()
df_aka=df_aka_orj.copy()
df_aka_orj
df_mak=df_aka_orj.set_index('Unnamed: 0')
df_mak=df_mak['Yayınlar ve Makaleler']
df_mak=pd.DataFrame(df_mak)
df_mak=df_mak.reset_index()
df_mak.columns=[0,1]
df_mak
plt.figure(figsize=(15,7))
sns.barplot(x=df_mak[0], y=df_mak[1])
plt.xticks(rotation= 89)
plt.xlabel('Akademisyen')
plt.ylabel('Yayın ve Makale Sayısı')
plt.title('TRAKYA UNIVERSITESI BILGISAYAR MUHENDISLIGI ')
df_aka=pd.read_csv('akademisyenler.csv',encoding='ISO-8859-9')
df_aka=df_aka.sort_values(by=['Yayınlar ve Makaleler'],ascending=False)
del df_aka['unvan']
df_aka=df_aka.reset_index()
del df_aka['index']
df_aka.head()
f,ax = plt.subplots(figsize = (10,10))
sns.barplot(x=df_aka['Araştırma Alanları'],y=df_aka['Unnamed: 0'],color='red',alpha = 0.99,label='Araştırma Alanı' )
sns.barplot(x=df_aka['Akademik Görevler'],y=df_aka['Unnamed: 0'],color='blue',alpha = 0.5,label='Akademik Görevler')
sns.barplot(x=df_aka['Yayınlar ve Makaleler'],y=df_aka['Unnamed: 0'],color='cyan',alpha = 0.5,label='Yayın ve Makaleler')
sns.barplot(x=df_aka['VerdiÄŸi Dersler'],y=df_aka['Unnamed: 0'],color='yellow',alpha = 0.5,label='VerdiÄŸi Dersler')
ax.legend(loc='lower right',frameon = True,prop={'size': 14})
ax.set(xlabel='Sayısı', ylabel='Akademisyen',title = "Akademisyen Rakamları 2021");
sns.heatmap(df_aka.corr(),annot=True)
df_aka.corr()
df_il_orj=pd.read_csv('iller.csv',encoding='ISO-8859-9')
df_il=df_il_orj.copy()
df_il_orj.head()
df_il['toplam']=df_il['2020']+df_il['2019']+df_il['2018']+df_il['2017']+df_il['2016']
df_il=df_il.sort_values(by=['toplam'],ascending=False)
df_il=df_il.reset_index()
del df_il['index']
df_il=df_il.set_index('Unnamed: 0')
df_il=df_il.drop(['yıllık toplam'])
df_il=df_il['toplam']
df_il=pd.DataFrame(df_il)
df_il=df_il.reset_index()
df_il.columns=[0,1]
df_il.rename(columns = {0 : "Sehir", 1 : "ogrenci sayisi"}, inplace = True)
df_il
fig = px.pie(df_il, values='ogrenci sayisi', names='Sehir', title='SON 5 YILDA(2020-) OGRENCILERIN SEHIR ORANI')
fig.show()
df_cog=pd.read_csv('cografi_bolge.csv',encoding='ISO-8859-9')
df_cog['toplam']=df_cog['2020']+df_cog['2019']+df_cog['2018']+df_cog['2017']+df_cog['2016']
df_cog.drop(['2020','2019','2018','2017','2016'], inplace=True, axis=1)
df_cog
fig = {
"data": [
{
"values": df_cog['toplam'],
"labels": df_cog['Unnamed: 0'],
"domain": {"x": [0.5, .5]},
"hoverinfo":"label+percent",
"hole": .3,
"type": "pie"
},],
"layout": {
"title":"SON 5 YILDA(2020-) BILGISAYAR MUHENDISLERI COGRAFI BOLGE ORANI",
"annotations": [
{ "font": { "size": 20},
"showarrow": False,
"text": "",
"x": 0.20,
"y": 1
},
]
}
}
iplot(fig)
df_kalan=pd.read_csv('bolum_dersleri.csv')
df_kalan['Toplam_Kalan']=df_kalan['2020']+df_kalan['2019']+df_kalan['2018']+df_kalan['2017']
df_kalan[:10]
df_kalan_sirali3=df_kalan.copy()
df_kalan_sirali3=df_kalan.groupby(['akademisyen']).sum()
df_kalan_sirali3=df_kalan_sirali3.sort_values(by=['Toplam_Kalan'],ascending=False)
df_kalan_sirali3=df_kalan_sirali3.reset_index()
df_kalan_sirali3.drop(['akts', 'sınıf','zorunlu'], axis=1,inplace=True)
df_kalan_sirali3[:10]
sns.set_context('paper')
f, ax = plt.subplots(figsize = (17,10))
sns.set_color_codes('pastel')
sns.barplot(x = 'Toplam_Kalan', y = 'akademisyen', data = df_kalan_sirali3,
label = 'Son 4 Yıl Toplamı', color = 'b', edgecolor = 'w').set_title('SON 4 YIL VE 2020 YILI ICIN AKADEMISYENLERIN BASARISIZ OGRENCI RAKAMLARI')
sns.set_color_codes('muted')
sns.barplot(x = '2020', y = 'akademisyen', data = df_kalan_sirali3,
label = '2020 Yılı', color = 'b', edgecolor = 'w')
ax.legend(ncol = 2, loc = 'lower right',prop={'size': 15})
sns.despine(left = True, bottom = True)
plt.show()
df_kalan3=df_kalan.copy()
df_kalan3.rename(columns={'Toplam_Kalan': 'Toplam Başarısız Sayısı'}, inplace=True)
df_kalan3.dropna(inplace=True)
df_kalan3['sınıf']=df_kalan3['sınıf'].astype(int)
df_kalan3['sınıf']=df_kalan3['sınıf'].astype(str)
fig = px.scatter(df_kalan3, y='Toplam Başarısız Sayısı', x='akts', color="sınıf",
title="SINIFLARA VE AKTS'YE GORE DERSLERIN BASARISIZ OGRENCI SAYILARI DAGILIMI SON 4 YIL(2020-)")
fig.show()
df_kalan8=df_kalan.copy()
df_kalan8=df_kalan8[df_kalan8['zorunlu']==1.0]
df_kalan8=df_kalan8.sort_values(by=['Toplam_Kalan'],ascending=False)
df_kalan8[:5]
df_kalan8=df_kalan8.filter(['Unnamed: 0','Toplam_Kalan'],axis=1).copy()
df_kalan8.dropna(inplace=True)
df_kalan8[:5]
plt.figure(figsize=(15,12))
sns.barplot(y=df_kalan8['Unnamed: 0'], x=df_kalan8['Toplam_Kalan'])
plt.xticks(rotation= 0)
plt.xlabel('BASARISIZ OGRENCI SAYISI')
plt.ylabel('DERSLER')
plt.title('SON 4 YILDA (2020-) ZORUNLU DERSLERIN BASARISIZ OGRENCI SAYILARI ');
df_kalan.corr()
print('\033[1m'+'\n Yıllara göre Başarısız Öğrenci Sayıları:\n 2020:',df_kalan['2020'].sum(),'Kişi','\n 2019:',df_kalan['2019'].sum(),'Kişi','\n 2018:',df_kalan['2018'].sum(),'Kişi','\n 2017:',df_kalan['2017'].sum(),'Kişi',
'\n\n Dönemlere Göre Başarısız Öğrenci Sayıları(2017-20):\n','GÜZ:',df_kalan[df_kalan['dönem']=='güz']['Toplam_Kalan'].sum(),'Kişi','\n BAHAR:',df_kalan[df_kalan['dönem']=='bahar']['Toplam_Kalan'].sum(),'Kişi')
df_yuzde=pd.read_csv('yuzde_on.csv')
df_yuzde['ISIMSOYISIM']=df_yuzde['ISIM']+" "+ df_yuzde['SOYISIM']
df_yuzde[:10]
sns.set_context('paper')
sns.countplot(x = 'DONEM', hue = 'CINSIYET', data = df_yuzde, palette = 'magma')
plt.title('%10 BASARI SAYISI (2020-2017)')
plt.ylabel("SAYISI")
plt.legend( ['KIZ', 'ERKEK'],fancybox=True, framealpha=1, shadow=True, borderpad=1);
plt.show()
df_yuzde[df_yuzde['DONEM']=='GÜZ'].describe()
# GÜZ DÖNEMİ
df_yuzde[df_yuzde['DONEM']=='BAHAR'].describe()
# BAHAR DÖNEMİ
# Bölümün son 3 yıldaki en başarılı öğrencileri
# %10'a en az 4 kez girmiş öğrenciler:15 kişi
a=pd.DataFrame(df_yuzde['ISIMSOYISIM'].value_counts())
a_list=[a.index[:16]]
bbd_l=[]
sinif=[]
cinsiyet_l=[]
isim_l=[]
for i in range(16):
#listelere her kişi için gerekli değerlerin eklenmesi
bbd_l.append( np.mean(1/df_yuzde[df_yuzde['ISIMSOYISIM']==a_list[0][i]]['SIRA']) * np.mean(df_yuzde[df_yuzde['ISIMSOYISIM']==a_list[0][i]]['ORTALAMA']) * df_yuzde[df_yuzde['ISIMSOYISIM']==a_list[0][0]]['ISIM'].count() )
sinif.append(df_yuzde[df_yuzde['ISIMSOYISIM']==a_list[0][i]]['SINIF'].max())
cinsiyet_l.append(df_yuzde[df_yuzde['ISIMSOYISIM']==a_list[0][i]]['CINSIYET'].max())
isim_l.append(a_list[0][i])
# oluşturulan listelerle sözlük vasıtasıyla dataframe oluşturma
dict = {'İSİM ': isim_l, 'BÖLÜM BAŞARI DEĞERİ': bbd_l, 'SINIF': sinif,'CİNSİYET':cinsiyet_l}
df_basari = pd.DataFrame(dict)
df_basari=df_basari.sort_values(by=['BÖLÜM BAŞARI DEĞERİ'],ascending=False)
df_basari=df_basari.reset_index(drop=True)
df_basari
# bölüm başarı değeri(başarı metriği) = ( 1 / (%10 listesindeki ortalama sırası)) x (%10'a girdiği notlar ortalaması) x (%10'a girme sayısı)
#bölümdeki en başarılı 15 kişi(en az 4 kez %10'da bulunma şartı var))
df_yuzde7=pd.DataFrame(df_yuzde['ISIM'].value_counts().head(10))
df_yuzde7.reset_index(inplace=True)
plt.figure(figsize=(10,8))
sns.barplot(x=df_yuzde7['index'], y=df_yuzde7['ISIM'],color=(0.0, 0.5, 0.0, 0.5))
plt.xticks(rotation= 0)
plt.xlabel('ISIM')
plt.ylabel("%10'DA BULUNMA SAYISI")
plt.title('SON 3 YILDA (2020-) EN SIK %10 LİSTESİNE GİREN İSİM ÇEŞİTLERİ ');
# EN BAŞARILI İSİMLER
df_yuzde_corr=df_yuzde.drop('YIL',axis=1)
sns.heatmap(df_yuzde_corr.corr(),annot=True)
df_devuni=pd.read_csv('bilg_muh_devlet.csv',encoding='utf-8')
df_devuni[:10]
df_devuni2=df_devuni.filter(['UNI','Yabancı Dil','PUAN'])
df_devuni2[45:50]
labels = np.array(df_devuni2['UNI'][30:])
values = np.array(df_devuni2['PUAN'][30:])
clrs = ['blue' if (x ==397) else 'grey' for x in values ]
plt.figure(figsize=(20,7))
#barplot
sns.barplot(y=labels, x=values, palette=clrs).set_title("TURKIYE DEVLET UNIVERSITELERINDE BILGISAYAR MUHENDISLIGI PUAN KARSILASTIRMASI 2021 (LISTENIN 30-55 ARALIGI) ")
plt.xticks(rotation=90);
df_uni=pd.read_csv('universite_bolumleri_prestij.csv',encoding='utf-8')
del df_uni['Unnamed: 0']
df_uni['Unnamed: 2']=='SAY'
df_uni[:10]
df_uni['Unnamed: 2']=='SAY'
df_uni_say=df_uni[df_uni['Unnamed: 2']=='SAY']
labels = np.array(df_uni_say['Unnamed: 1'])
values = np.array(df_uni_say['Unnamed: 4'])
clrs = ['green' if (x ==342.42304) else 'grey' for x in values ]
plt.figure(figsize=(20,7))
#barplot
sns.barplot(x=labels, y=values, palette=clrs).set_title("TRAKYA UNIV. SAYISAL BOLUMLER ARASINDA BILGISAYAR MUHENDISLIGININ YERI 2021 ")
plt.xticks(rotation=65);
df_mez_orj=pd.read_csv('mezun-ogrenci_profili.csv')
del df_mez_orj['Unnamed: 0']
df_mez=df_mez_orj
df_mez_orj[:15]
liste_acik=df_mez.ACIKLAMA
liste_aciklama=','.join(liste_acik)
liste_aciklama[:4000]
stopwords = set(STOPWORDS)
stopwords.update(["Computer", "University", "Trakya", "Mühendisliği", "Üniversitesi",'Engineering','Installing','Mezunları',
'Bilgisayar','Türkiye','İstanbul','bağlantı','Edirne',"Lisans","Derecesi","DerecesiBilgisayar","eğitim","kurumunda",
"şu","okulda","Turkey","Department","degreeComputer","Engineering3","öğrenci","Türkiye500","kurmak için",'degree','Yüksek',
'professional',"Engineering2","ÅŸirketinde"])
text = liste_aciklama
wordcloud = WordCloud(width=1600, height=800,stopwords=stopwords,background_color="black").generate(text)
plt.figure( figsize=(20,10), facecolor='k')
plt.imshow(wordcloud,interpolation='Lanczos')
plt.axis("off")
plt.tight_layout(pad=0)
plt.show()
liste_company=df_mez.company
liste_company=liste_company.dropna()
liste_company=','.join(liste_company)
liste_company
liste_company=df_mez.company
liste_company=liste_company.dropna()
liste_company=','.join(liste_company)
stopwords = set(STOPWORDS)
stopwords.update(["asd"])
text = liste_company
wordcloud = WordCloud(width=1600, height=800,stopwords=stopwords,background_color="white").generate(text)
plt.figure( figsize=(20,10), facecolor='k')
plt.imshow(wordcloud,interpolation='Lanczos')
plt.axis("off")
plt.tight_layout(pad=0)
plt.show()
liste_title=df_mez.title
liste_title=','.join(liste_title)
liste_title[:1000]
stopwords = set(STOPWORDS)
stopwords.update(["asd"])
text = liste_title
wordcloud = WordCloud(width=1600, height=800,stopwords=stopwords,background_color="white").generate(text)
plt.figure( figsize=(20,10), facecolor='k')
plt.imshow(wordcloud,interpolation='Lanczos')
plt.axis("off")
plt.tight_layout(pad=0)
plt.show()